<%@include file="/WEB-INF/header.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!-- 首页 -->
<div class="container">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">
				<span class="glyphicon glyphicon-camera"></span> 最新图片
			</h3>
		</div>
		<div class="panel-body">
			<div class="row">

				<c:forEach items="${plist}" var="pl">
					<div class="col-sm-6 col-md-3">
						<a
							href="${pageContext.request.contextPath}/photoview.action?mediaid=${pl.mediaid}&medianum=${fn:length(plist)}">
							<div class="thumbnail">
								<img src="${pageContext.request.contextPath}${pl.mediaurl}"
									alt="缩略图" class="img-thumbnail">
								<div class="caption">
									<h4>${pl.mediatitle}</h4>
									<p>${pl.description}</p>
									<p>
										<fmt:formatDate value="${pl.screendate}" pattern="yyyy-MM-dd" />
									</p>
								</div>
							</div>
						</a>
					</div>
				</c:forEach>
				<div class="pull-right">
					<a href="${pageContext.request.contextPath}/photolist.action"
						class="btn btn-primary" role="button">更多图片 &gt;&gt;</a>
					&nbsp;&nbsp;
				</div>
			</div>
		</div>
	</div>

	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">
				<span class="glyphicon glyphicon-film"></span> 最新视频
			</h3>
		</div>
		<div class="panel-body">
			<div class="row">

				<c:forEach items="${vlist}" var="v">
					<div class="col-sm-6 col-md-3">
						<div class="thumbnail">
							<video
<%--								poster="${pageContext.request.contextPath}${v.vedioimageurl}"--%>
								controls height="100%" width="98%">
								<source src="${pageContext.request.contextPath}${v.mediaurl}"
									type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'>
							</video>
							<div class="caption">
								<h4>${v.mediatitle}</h4>
								<p>${v.description}</p>
							</div>
						</div>
					</div>
				</c:forEach>
				<div class="pull-right">
					<a href="${pageContext.request.contextPath}/videolist.action"
						class="btn btn-primary" role="button">更多视频 &gt;&gt;</a>
					&nbsp;&nbsp;
				</div>

			</div>
		</div>
	</div>
</div>
<%@include file="/WEB-INF/footer.jsp"%>